package com.csdj.controller;

import com.csdj.pojo.MerchantsIngredientsSpec;
import com.csdj.service.MerchantsIngredientsSpecService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class MerchantsIngredientsSpecController {
    @Autowired
    private MerchantsIngredientsSpecService merchantsIngredientsSpecService;

    @RequestMapping("/getSpec01" )
    @ResponseBody
    public String selectAll01() {
        List<MerchantsIngredientsSpec> specs = merchantsIngredientsSpecService.selectAll();
        return "mybatis xml查询："+specs;
    }
    @RequestMapping("/getSpec02" )
    @ResponseBody
    public String selectAll02() {
        List<MerchantsIngredientsSpec> specs = merchantsIngredientsSpecService.getBaseMapper().selectList(null);
        return "mybatisPlus 模版查询："+specs;
    }
}
